<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-US" xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
	<head>
		<meta name="author" content="Bardelle Renzo"/>
		<title>
			Gestione sale
		</title>
		
		<script type="text/javascript">
			<% if((session.getAttribute("utente")==null) || !((Boolean)(session.getAttribute("amministrativo")))) out.print("window.location=\"index.jsp\";"); %>
		</script>
		
		<script type="text/javascript" src="jQuery/jquery-1.9.1.min.js"></script>
		<script type="text/javascript" src="js/amm_gestione_sale.js"></script>
		<link rel="stylesheet" href="css/amm_index.css" type="text/css"/>
		<link rel="stylesheet" href="css/amm_gestione_sale.css" type="text/css" media="all" />
	</head>
	<body onload="refresh();logAttenzione()">
		<jsp:include page="amm_menu.jsp"/>
		<div id="main-sala-div">
		<div id="menu-gestione-sale">
			<table>
				<tr><td colspan="2" id="center">
						<input id="modifica-crea" type="button" value="Modifica/Crea" onclick="modificaCrea()">
					</td></tr>
				<tr><td colspan="2" id="center"><font id="titolo">Modifica sala esistente:</font></td></tr>
				
				<tr><td id="label">Sede:</td><td>
					<select id="scelta-sede" onchange="sceltaSede()">
						<option value="-1">...</option>
						<jsp:include page="../getSediSceltaMultipla" />
					</select></td></tr>
				
				<tr id="scelta-sala-tr"><td id="label">Sala:</td><td>
					<select id="scelta-sala" onchange="sceltaSala()">
						<option value="-1"></option>
					</select></td></tr>
				
				<tr><td id="label">Nome:</td><td><input type="text" id="nome-sala" onkeyup="nomeSalaChanged()"></td></tr>
				<tr><td id="label">Sigla:</td><td><input type="text" id="sigla-sala" onkeyup="siglaSalaChanged()"></td></tr>
				<tr id="id-sala-tr"><td id="label">IDSala:</td><td><input type="text" id="id-sala" disabled></td></tr>
				<tr id="elimina-sala-tr"><td colspan="2" id="center">
						<input id="elimina" type="button" value="Elimina sala" onclick="eliminaSelezionata()">
				</td></tr>
				<tr><td id="label">Poltrone:</td><td id="center">
					<input type="text" id="totale-posti" size="4" disabled>
				</td></tr>
				
				<tr><td id="label">Righe:</td><td id="center">
										<input type="button" value="-" onclick="dimr()">
										<input id="r-number" type="text" value="2" disabled>
										<input type="button" value="+" onclick="addr()">
									</td></tr>
				<tr><td id="label">Colonne:</td><td id="center">
										<input type="button" value="-" onclick="dimc()">
										<input id="c-number" type="text" value="2" disabled>
										<input type="button" value="+" onclick="addc()">
									</td></tr>
				<tr><td colspan="2" id="center">
						<input id="salva" type="button" value="Salva le modifiche" onclick="salvaModifiche()">
				</td></tr>
			</table>		
		</div>
		
		<div id="anatomia-sala">
			<div id="superficie-sala">
					<h1 id="nome-sala-h1"></h1>
					<img src="css/images/amm_schermo_transparent.png">
					<table id="poltrone">
					</table>
			</div>
			<div id="messaggi-utente">
			</div>
		</div>
		</div>		
	</body>
</html>
